﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Views/Shared/AdminSite.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	WRMS-Admin
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
<script language="javascript" type="text/javascript">
	window.openSubWindow = function (title, url) {
        //存在则刷新，不存在则加入
        if($('#MainTab').tabs('exists', title)){
            var panel = $('#MainTab').tabs('getSelected');
            panel.children("iframe")[0].contentWindow.location.href = url;
        }else{
	        $('#MainTab').tabs('add', {
	            title: title,
	            content: '<iframe src="' + url + '" frameborder="0" height="98%" width="98%" scroll="auto"></iframe>',
	            closable: true
	        });
        }
	}

	$(function () {
	    var p = $('body').layout('panel', 'west').panel({
	        onCollapse: function () {
	            alert('collapse');
	        }
	    });
	});

	$(function () {
	    $('#MainTab').tabs({
	        tools: [{
	                iconCls: 'icon-reload',
                    title:'刷新当前',
	                handler: function () {
	                    var panel = $('#MainTab').tabs('getSelected');
                        panel.children("iframe")[0].contentWindow.location.reload();
	                }
	        }, {
	                iconCls: 'icon-add',
                    title:'添加窗口',
	                handler: function () {
	                    alert('add');
	                }
	        }, {
	                iconCls: 'icon-remove',
                    title:'关闭全部',
	                handler: function () {
	                    alert('cancel');
	                }
	        }<%--, {
	                iconCls: 'icon-blank',
	                handler: function () {
	                    alert('blank');
	                }
	            }--%>]
	    });
	});
</script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="BodyContent" runat="server">
<body class="easyui-layout">
	<div region="north" split="false" border="false" style="height:90px;">
        <%Html.RenderAction("Top"); %>
    </div>
	<div region="west" split="true" title="WRMS-MENU" style="width:200px;">
        <iframe id="menuFrame" src="<%=Url.Action("Left")%>" frameborder="0" height="98%" width="98%"></iframe>
    </div>
	<%--<div region="east" split="true" title="East" style="width:100px;padding:10px;">east region</div>--%>
	<%--<div region="south" border="false" style="height:50px;background:#A9FACD;padding:10px;">south region</div>--%>
	<div id="MainTab" region="center" border="true" style="background-color:#ffffee;" fit="false" plain="false">
		<div title="系统信息">
            <iframe src="about:blank" frameborder="0" height="98%" width="98%"></iframe>
		</div>
		<%--<div title="栏目管理" closable="true" cache="false" href="about:blank">
			<iframe src="about:blank" frameborder="0" height="98%" width="98%"></iframe>
		</div>--%>
	</div>
    
</body>
</asp:Content>
<%--<div class="easyui-window" title="Inline Window" inline="true" style="width:250px;height:150px;padding:10px">
	This window stay inside its parent
</div>--%>